package cn.shyouchi.wuguanjia.android.api.train;

import java.util.List;
import java.util.Map;

import cn.shyouchi.wuguanjia.android.model.BaseRequestResult;
import cn.shyouchi.wuguanjia.android.ui.train.MasterEntity;
import cn.shyouchi.wuguanjia.android.ui.train.TrainEntity;
import cn.shyouchi.wuguanjia.android.ui.train.TrainPostEntity;
import cn.shyouchi.wuguanjia.android.ui.trainstatistic.TrainStatistEntity;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;
import rx.Observable;

/**
 * Created by Eenie on 2017/3/22 at 16:33
 * Email: 472279981@qq.com
 * Des:
 */

public interface TrainService {

    /**
     * 获取培训数据
     * @return
     */
    @GET("training")
    Observable<BaseRequestResult<List<TrainEntity>>> getTrainData();


    @GET("trainingInfo")
    Observable<BaseRequestResult<MasterEntity>> getMasterData(@QueryMap Map<String, Object> params);


    /**
     * 获取培训统计列表
     * @param params
     * @return
     */
    @GET("training/total")
    Observable<BaseRequestResult<List<TrainStatistEntity>>> getTrainStatistic(@QueryMap Map<String, Object> params);

    @GET("trainingInfo")
    Observable<BaseRequestResult<TrainPostEntity>> getPostData(@QueryMap Map<String, Object> params);

    @FormUrlEncoded
    @POST("trainingAdd")
    Observable<BaseRequestResult<String>> addTrainRecorder(@QueryMap Map<String, Object> params);


}
